import { Button, Result } from 'antd';
import React from 'react';
import { useHistory } from 'react-router-dom';

/**
 * 用户访问一个没有权限的菜单时展示的页面
 */
const NoPermissionPage: React.FunctionComponent = () => {
  const history = useHistory();
  return (
    <Result
      status="403"
      title="401"
      subTitle="Sorry, 您没有权限访问这个页面."
      extra={
        <Button type="primary" onClick={() => history.push('/webseats')}>
          Back Home
        </Button>
      }
    />
  );
};

export default NoPermissionPage;
